package MyBlog.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import MyBlog.biz.PhotoBiz;
import MyBlog.dao.PhotoDao;
import MyBlog.entity.Photo;

@Service("photoBiz")
public class PhotoBizImpl implements PhotoBiz{

	@Autowired
	private PhotoDao photoDao;

	@Override
	public List<Photo> getPhotosByUserIdAndAlbumId(int albumId, int userId) {
		return photoDao.getPhotosByUserIdAndAlbumId(albumId, userId);
	}

	@Override
	public Photo getPhotoById(int id) {
		return photoDao.getPhotoById(id);
	}

	@Override
	public void add(Photo photo) {
		photoDao.add(photo);
	}

	@Override
	public void update(Photo photo) {
		photoDao.update(photo);
	}
}
